/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.pojo.sqlServer;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
* @website https://eladmin.vip
* @description /
* @author xinglin
* @date 2024-08-03
**/
@Entity
@Data
@Table(name="pp_info")
public class PPInfo implements Serializable {

    @Id
    @Column(name = "`id`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`pp`")
    @ApiModelProperty(value = "pp批次号")
    private String pp;

    @Column(name = "`batch`")
    @ApiModelProperty(value = "工程号")
    private String batch;

    @Column(name = "`pp_batch`")
    @ApiModelProperty(value = "板子批号")
    private String ppBatch;

    @Column(name = "`pp_material`")
    @ApiModelProperty(value = "材质")
    private String ppMaterial;

    @Column(name = "`pp_model`")
    @ApiModelProperty(value = "型号")
    private String ppModel;

    @Column(name = "`pp_mfrs`")
    @ApiModelProperty(value = "厂商")
    private String ppMfrs;

    @Column(name = "`pp_size`")
    @ApiModelProperty(value = "尺寸")
    private String ppSize;

    @Column(name = "`pp_qty`")
    @ApiModelProperty(value = "数量")
    private Integer ppQty;

    @Column(name = "`pp_pd`")
    @ApiModelProperty(value = "生产时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime ppPd;

    @Column(name = "`pp_exp`")
    @ApiModelProperty(value = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime ppExp;

    @Column(name = "`pp_worker`")
    @ApiModelProperty(value = "作业人员")
    private String ppWorker;

    @Column(name = "`pp_device`")
    @ApiModelProperty(value = "作业设备")
    private String ppDevice;

    @Column(name = "`method`")
    @ApiModelProperty(value = "定位方式")
    private String method;

    @Column(name = "`is_pakage`")
    @ApiModelProperty(value = "是否打包")
    private Integer isPakage;


    @Column(name = "`rc`")
    @ApiModelProperty(value = "胶含量")
    private String rc;

    @Column(name = "`pp_pack`")
    @ApiModelProperty(value = "打包时间")
    private LocalDateTime ppPack;

    @Column(name = "`pp_hole`")
    @ApiModelProperty(value = "孔类型")
    private String ppHole;



    public void copy(PPInfo source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
